#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
int main()
{
	int i, j;
	int x = 0;
	int y = 5;
	char input;

	while (1)
	{
		system("cls");
		for (i = 0; i < x; i++)
			printf("\n");
		for (j = 0; j < y; j++)
			printf(" ");

		printf("  *\n");
		for (j = 0; j < y; j++)
			printf(" ");
		printf("*****\n");
		for (j = 0; j < y; j++)
			printf(" ");
		printf(" * *\n");

		input = _getch();
		if (input == 'S')
			x++;
		if (input == 'W')
			x--;
		if (input == 'A')
			y--;
		if (input == 'D')
			y++;
	}

	system("pause");
	return 0;
}